package controller.data;

import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;

import model.role.player.Player;

public class SaveListener implements WindowListener {
	
	private Player player; 
	
	public SaveListener(Player player) {
		this.player = player;
	}

	@Override
	public void windowClosing(WindowEvent e) {
		PlayerFile.savePlayer(player);
	}

	@Override
	public void windowOpened(WindowEvent e) {

	}

	@Override
	public void windowClosed(WindowEvent e) {

	}

	@Override
	public void windowIconified(WindowEvent e) {

	}

	@Override
	public void windowDeiconified(WindowEvent e) {

	}

	@Override
	public void windowActivated(WindowEvent e) {

	}

	@Override
	public void windowDeactivated(WindowEvent e) {

	}

}